feat(agent): add ontology binding to Data Fabric context config#1728
feat(agent): add ontology binding to Data Fabric context config#1728sankalp-uipath wants to merge 27 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-ontology-binding # Conflicts: # packages/uipath-platform/src/uipath/platform/entities/_entities_service.py
…older_key_headers
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🚨 Heads up:
|
…-ontology-binding # Conflicts: # packages/uipath-platform/pyproject.toml # packages/uipath-platform/uv.lock # packages/uipath/pyproject.toml # packages/uipath/uv.lock
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9ee4757 to
1ce9049
Compare
| description: Optional[str] = None | ||
|
|
||
|
|
||
| class DataFabricOntologyItem(BaseModel): |
There was a problem hiding this comment.
Same for this. Move it to entities_ontology_service
| ) | ||
|
|
||
| name: str | ||
| ontology_key: Optional[str] = Field(None, alias="referenceKey") |
There was a problem hiding this comment.
Ontology is not solution aware at this point. Does it make sense for this to come from here?
There was a problem hiding this comment.
Sorry I didn't get you why ontology not being solution aware will cause issue, currently folder id is just for scoping and coming from agent.json
There was a problem hiding this comment.
Removed ontology_key, please review again.
| None, description="Context settings" | ||
| ) | ||
| entity_set: Optional[List[DataFabricEntityItem]] = Field(None, alias="entitySet") | ||
| ontology_set: Optional[List[DataFabricOntologyItem]] = Field( |
There was a problem hiding this comment.
Is the plan to add set of ontologies or single ontology ? Set doesnt make sense to me , but let me know if that decision has already been settled. cc: @milind-jain-uipath
There was a problem hiding this comment.
Please correct me if am wrong @milind-jain-uipath
Yes plan is to allow users to add set of ontologies
9b6f320 to
e98f5a1
Compare
e98f5a1 to
54e45ef
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…0.1.83 / uipath 2.11.17
| async def test_accepts_allowed_file_types( | ||
| self, service: EntitiesService, file_type: str |
There was a problem hiding this comment.
nit: how about a test for the negative case:
Rejects unsupported file types?
🚨 Heads up:
|
|



What
Adds Data Fabric ontology binding to the agent context model: a context can carry one or more ontologies that the runtime fetches to ground Text2SQL.
agent/models/agent.py—AgentContextResourceConfig.ontology_set(aliasontologySet), a list ofDataFabricOntologyItemnested in the context alongsideentitySet.platform/entities/_entity_ontology_service.py—DataFabricOntologyItem({name, folderId, description?}) +EntityOntologyServicefor ontology file retrieval.platform/entities/_entities_service.py—get_ontology_file_async(ontology_name, file_type="owl", folder_key=None): validates name and file_type, hitsGET datafabric_/api/ontologies/{name}/files/{type}on the authenticated, folder-scoped client.Why
An ontology is part of a Data Fabric context — domain knowledge over the same entities — so it is configured inline on the context (a sibling of
entitySet), mirroring how entities are bound. Each ontology carries its ownfolderIdso it can live in a different folder from the entities.Notes
ontology_setdefaults toNone.referenceKeyon ontology items: ontologies are not solution-aware at this point, so there is no solution key to reference. The field is dropped fromDataFabricOntologyItem— it was never populated or read (ontologies resolve byname+folderId). Backward compatible: configs that still sendreferenceKeyare tolerated viaextra="allow".^[a-z][a-z0-9-]{0,63}$) and file_type (owl/r2rml/shacl/summary/context) are allowlisted before entering the URL.ontologySetparse/dump, requiredfolderIdper item, backward-compat default, full-AgentDefinitionnormalization;get_ontology_file_asynccovered for spec, folder header, file types, rejected name/type.uipath→2.11.17,uipath-platform→0.1.83, pinuipath-platform>=0.1.83; lockfiles relocked.Development Packages
uipath-platform
uipath